package classes;

import java.util.HashMap;
import java.util.Map;

public class CustomerLookUpService {
	private static Map<String, BankCustomer> customers;
	private CustomerLookUpService() {
		
	}
	
	static {
		customers = new HashMap<String, BankCustomer>();
		BankCustomer b1 = new BankCustomer();
		b1.setPassword("123");
		b1.setUsername("tu");
		customers.put("id001", b1);
		
		BankCustomer b2 = new BankCustomer();
		b1.setPassword("123");
		b1.setUsername("tam");
		customers.put("id001", b2);
		
		BankCustomer b3 = new BankCustomer();
		b1.setPassword("123");
		b1.setUsername("hoai");
		customers.put("id001", b3);
	}
	
	public static Map getCustomers() {
		return(customers);
	}
	
	public static BankCustomer getCustomerById(String id) {
		return (customers.get(id.toLowerCase()));
	}
}
